package JAVACORE_TRAINING.OOPs.INHERISTANCE;

class Parent04 {
	String name;

	public Parent04(String n) {
		name = n;
	}
}

public class ReferingConstructors extends Parent04 {
	String name;

	public ReferingConstructors(String n1, String n2) {
		super(n1); // passing argument to parent class constructor
		this.name = n2;
	}

	public void details() {
		System.out.println(super.name + " and " + name);
	}

	public static void main(String[] args) {
		ReferingConstructors cobj = new ReferingConstructors("Parent", "Child");
		cobj.details();
	}
}
